from django.views import View
from django.shortcuts import render
from django.utils.decorators import method_decorator
from common.views.utils import permission_required,view_logs_required

class DictListView(View):
    @method_decorator(permission_required('dict'))
    @method_decorator(view_logs_required)
    def get(self, request):
        return render(request, 'view/admin/dict/dict.html', {'power':request.powers})

class FileListView(View):
    @method_decorator(permission_required('files'))
    @method_decorator(view_logs_required)
    def get(self, request):
        return render(request, 'view/admin/file/file.html', {'power':request.powers})